package com.wsjzzcbq.qianyuan.sys.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.wsjzzcbq.qianyuan.common.bean.PageBean;
import com.wsjzzcbq.qianyuan.common.bean.R;
import com.wsjzzcbq.qianyuan.sys.bean.SysUser;
import com.wsjzzcbq.qianyuan.sys.param.AddSysUserParam;
import com.wsjzzcbq.qianyuan.sys.param.FindSysUserListParam;
import com.wsjzzcbq.qianyuan.sys.param.LoginParam;
import com.wsjzzcbq.qianyuan.sys.vo.LoginVo;
import com.wsjzzcbq.qianyuan.sys.vo.SysUserInfoVo;
import com.wsjzzcbq.qianyuan.sys.vo.SysUserVo;

/**
 * SysUserService
 *
 * @author wsjz
 * @date 2022/03/10
 */
public interface SysUserService extends IService<SysUser> {

    /**
     * 登录验证
     * @param param
     * @return
     */
    R<LoginVo> login(LoginParam param);

    /**
     * 通过token获取用户信息
     * @param token
     * @return
     */
    R<SysUserInfoVo> getSysUserInfo(String token);

    /**
     * 退出系统
     * @return
     */
    R<?> logout();

    /**
     * 获取用户分页数据
     * @param param
     * @return
     */
    R<PageBean<SysUserVo>> findList(FindSysUserListParam param);

    /**
     * 添加或修改用户(通过id区分，有id修改/无id添加)
     * @param param
     * @return
     */
    R<?> addOrUpdate(AddSysUserParam param);

    /**
     * 通过id查询用户
     * @param id
     * @return
     */
    R<?> findSysUserById(String id);

    /**
     * 通过id删除用户
     * @param id
     * @return
     */
    R<?> deleteSysUserById(String id);
}
